package logic

import (
	"context"
	user "online-medical-consultation/common/proto"
	"online-medical-consultation/service/server"
)

type ServerUser struct {
	user.UnimplementedUserServer
}

func (s ServerUser) SendSms(ctx context.Context, in *user.SendSmsReq) (*user.SendSmsResp, error) {
	sms, err := server.SendSms(in)
	if err != nil {
		return nil, err
	}
	return sms, nil
}
func (s ServerUser) UserLogin(ctx context.Context, in *user.UserLoginReq) (*user.UserLoginResp, error) {
	login, err := server.UserLogin(in)
	if err != nil {
		return nil, err
	}
	return login, nil
}
func (s ServerUser) AddPatient(ctx context.Context, in *user.AddPatientReq) (*user.AddPatientResp, error) {
	patient, err := server.AddPatient(in)
	if err != nil {
		return nil, err
	}
	return patient, nil
}
func (s ServerUser) HospitalList(ctx context.Context, in *user.HospitalListReq) (*user.HospitalListResp, error) {
	list, err := server.HospitalList(in)
	if err != nil {
		return nil, err
	}
	return list, nil
}
func (s ServerUser) HospitalToEs(ctx context.Context, in *user.HospitalToEsReq) (*user.HospitalToEsResp, error) {
	list, err := server.HospitalToEs(in)
	if err != nil {
		return nil, err
	}
	return list, nil
}
func (s ServerUser) SearchHospitalEs(ctx context.Context, in *user.SearchHospitalEsReq) (*user.HospitalListResp, error) {
	es, err := server.SearchHospitalEs(in)
	if err != nil {
		return nil, err
	}
	return es, nil
}
func (s ServerUser) DepartmentList(ctx context.Context, in *user.DepartmentListReq) (*user.DepartmentListResp, error) {
	list, err := server.DepartmentList(in)
	if err != nil {
		return nil, err
	}
	return list, nil
}
func (s ServerUser) SearchDepartment(ctx context.Context, in *user.SearchDepartmentReq) (*user.SearchDepartmentResp, error) {
	department, err := server.SearchDepartment(in)
	if err != nil {
		return nil, err
	}
	return department, nil
}
func (s ServerUser) PatientList(ctx context.Context, in *user.PatientListReq) (*user.PatientListResp, error) {
	list, err := server.PatientList(in)
	if err != nil {
		return nil, err
	}
	return list, nil
}
func (s ServerUser) DockerList(ctx context.Context, in *user.DockerListReq) (*user.DockerListResp, error) {
	list, err := server.DockerList(in)
	if err != nil {
		return nil, err
	}
	return list, nil
}
func (s ServerUser) CreateOrder(ctx context.Context, in *user.CreateOrderReq) (*user.CreateOrderResp, error) {
	order, err := server.CreateOrder(in)
	if err != nil {
		return nil, err
	}
	return order, nil
}
func (s ServerUser) OrderList(ctx context.Context, in *user.OrderListReq) (*user.OrderListResp, error) {
	list, err := server.OrderList(in)
	if err != nil {
		return nil, err
	}
	return list, nil
}
func (s ServerUser) PayTime(ctx context.Context, in *user.PayTimeReq) (*user.PayTimeResp, error) {
	time, err := server.PayTime(in)
	if err != nil {
		return nil, err
	}
	return time, nil
}
